//
// Created by A on 2022/10/14.
//

#ifndef COROUTINE_EZCO_V_0_0_1_X64_MACOSX_CLANG_UTIL_H
#define COROUTINE_EZCO_V_0_0_1_X64_MACOSX_CLANG_UTIL_H

#include <stdint.h>
#include <time.h>

#define PRIVATE static
#define PUBLIC

#define bool unsigned char
#define true 1
#define false 0

#define max(x, y)  ((x)>(y)?(x):(y))
#define min(x, y)  ((x)<(y)?(x):(y))



#include <sys/syscall.h>





time_t to_ns_time(const struct timespec *timespec);

struct timespec diff_from_now(time_t ms);

bool cas_int(volatile int *addr, int oldVal, int newVal);






#endif //COROUTINE_EZCO_V_0_0_1_X64_MACOSX_CLANG_UTIL_H
